# Maintainer: Daniel Isenmann <daniel@archlinux.org>
# Contributor: TDY <tdy@gmx.com>
# Contributor: Paul Burton <paulburton89@gmail.com>
# Contributor: rabyte <rabyte__gmail>

pkgname=webkit-sharp
pkgver=0.3
pkgrel=4
pkgdesc="Mono/.NET bindings for the WebKit rendering engine"
arch=('i686' 'x86_64')
url="http://www.mono-project.com/"
license=('custom:MIT')
depends=('gtk-sharp-2' 'libwebkit>=1.4.0')
makedepends=('pkgconfig>=0.9.0')
source=(http://download.mono-project.com/sources/$pkgname/${pkgname}-${pkgver}.tar.bz2)
md5sums=('21482f9d5eafb0ef4acc6e790482f934')

build() {
  export MONO_SHARED_DIR="${srcdir}/.wabi"
  mkdir -p "${MONO_SHARED_DIR}"

  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i 's:webkit-1.0@LIB_PREFIX@.2@:libwebkitgtk-1.0@LIB_PREFIX@.0@:' sources/webkit-sharp.dll.config.in
  ./configure --prefix=/usr
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  
  make DESTDIR=${pkgdir} install
  install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING

}
